package com.emailsystem.emailsystem.service;


import com.emailsystem.emailsystem.domain.Completion;
import com.emailsystem.emailsystem.domain.Connection;
import com.emailsystem.emailsystem.domain.User;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
@Service
public interface UserService {

    //新
    /**
     * 找到账号的密码出来
     * @param account
     * @return
     */
    String getPassword(String account);

    /**
     * 通过账号密码获取用户信息
     * @param account
     * @return
     */
    User getUserByAccount(String account);
     void insert(String account,String password);
     void update(String account,String password);
     boolean updateConnection(String account,String IP,Integer port,String protocol);
     boolean addConnection(String account,String IP,Integer port,String protocol);
     ArrayList<Connection>getConnection(String account);
     boolean testAccountExistence(String account);
     Completion getCompletionByAccount(String account);

    User getCurrentUser();

    void setCurrentUser(String Account);
}
